<script>
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]

oddArr = [1, 3, 5, 7, 9]

function sortOdd(arr) {
  const filterFn = n => n%2
  const oddArr = arr.filter(filterFn)
                    .sort()
  return arr.map(n =>
    filterFn(n) ? arr.shift() : n
  )
}
</script>